home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00829_SU-en bt env.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  2.9 KB  |  105 lines

  1. on MouseClick Quel_Env
  2.   global gNumSpr, g1erSprLoc, gBoutons, gEtudAct, gEtatEtud, gEtatPrec, gEtudPrec, gSurvolPrec, gCodEnv, gNumEnv, gNomBestEnv, gSujet0, exitFrame, gCDpath, gOffZ, gOffE, gEnvSel, gOldEnvSel, gScopeEnZ, gScopeEnB, gDur
  3.   curseur(6)
  4.   sound stop 1
  5.   set CodGen to gSujet0(Le_CodeZoom)
  6.   if char 1 of gEtatPrec <> " " then
  7.     set numPrec to getPos(gCodEnv, gEtatPrec)
  8.     if numPrec = 1 then
  9.       if (Quel_Env = 2) or (Quel_Env = 3) then
  10.         set offDep to 141
  11.       else
  12.         set offDep to 232
  13.       end if
  14.     end if
  15.     if numPrec = 2 then
  16.       if (Quel_Env = 1) or (Quel_Env = 4) then
  17.         set offDep to 232
  18.       else
  19.         set offDep to 141
  20.       end if
  21.     end if
  22.     if numPrec = 3 then
  23.       if (Quel_Env = 1) or (Quel_Env = 4) then
  24.         set offDep to 232
  25.       else
  26.         set offDep to 141
  27.       end if
  28.     end if
  29.     if numPrec = 4 then
  30.       if (Quel_Env = 2) or (Quel_Env = 3) then
  31.         set offDep to 141
  32.       else
  33.         set offDep to 232
  34.       end if
  35.     end if
  36.     gScopeEnB(SetTime, (gOffZ + gOffE + offDep) * 4)
  37.     go(the frame)
  38.     set gDur to (gOffZ + gOffE + offDep + 75) * 4
  39.     gScopeEnB(Box, 20, 92, 280, 256)
  40.     gScopeEnB(SetCadence, 1)
  41.     repeat while gScopeEnB(GetTime) < gDur
  42.       go(the frame)
  43.     end repeat
  44.     gScopeEnB(SetCadence, 0)
  45.   else
  46.     gScopeEnB(visible, 1)
  47.   end if
  48.   set gOffE to ((getPos(gCodEnv, gEtatEtud) - 1) * 323) + 101
  49.   put "><" && gOffZ + gOffE
  50.   gScopeEnB(SetTime, 500)
  51.   gScopeEnB(Box, 20, 92, 280, 256)
  52.   go(the frame)
  53.   set gDur to 1000
  54.   gScopeEnB(SetCadence, 1)
  55.   repeat while gScopeEnB(GetTime) < gDur
  56.     go(the frame)
  57.   end repeat
  58.   gScopeEnB(SetCadence, 0)
  59.   gBoutons(habille, g1erSprLoc + 7, "BTGOEI 1")
  60.   curseur(-1)
  61.   set gSurvolPrec to -1
  62. end
  63.  
  64. on mouseDown
  65.   global gNumSpr, gEtatEtud, gCodEnv, gNumEnv, gNomBestEnv, g1erSprLoc
  66.   repeat with i = g1erSprLoc + 8 to g1erSprLoc + 11
  67.     if rollOver(i) then
  68.       set numact to charToNum(char 4 of the name of cast the castNum of sprite i) - 48
  69.       set moncod to getAt(gCodEnv, numact)
  70.       if (char 1 of moncod <> " ") and (moncod <> gEtatEtud) then
  71.         curseur(2)
  72.         set gNumSpr to i
  73.       else
  74.         curseur(7)
  75.       end if
  76.       exit repeat
  77.     end if
  78.   end repeat
  79. end
  80.  
  81. on mouseUp
  82.   global gNumSpr, gSurvolAct, gEtudAct, gEtudPrec, gEtatPrec, gEtatEtud, gCodEnv, gNumEnv, gNomBestEnv, g1erSprLoc, gSurvolPrec
  83.   curseur(1)
  84.   set numact to 10
  85.   repeat with i = g1erSprLoc + 8 to g1erSprLoc + 11
  86.     if rollOver(i) then
  87.       set numact to charToNum(char 4 of the name of cast the castNum of sprite i) - 48
  88.       set moncod to getAt(gCodEnv, numact)
  89.       if (char 1 of moncod <> " ") and (moncod <> gEtatEtud) and (i = gNumSpr) then
  90.         if numact = 2 then
  91.           set gEtatPrec to gEtatEtud
  92.           set gEtatEtud to moncod
  93.           MouseClick(numact)
  94.         else
  95.           beep()
  96.           set gSurvolPrec to -1
  97.         end if
  98.       else
  99.         pass()
  100.       end if
  101.       exit repeat
  102.     end if
  103.   end repeat
  104. end
  105.